package cn.tedu.flower.manage.content.service;

import cn.tedu.flower.manage.common.pojo.vo.PageData;
import cn.tedu.flower.manage.content.pojo.entity.Address;
import cn.tedu.flower.manage.content.pojo.param.AddressAddNewParam;
import cn.tedu.flower.manage.content.pojo.param.AddressUpdateParam;
import cn.tedu.flower.manage.content.pojo.vo.AddressListItemVO;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface IAddressService {
    /**
     * 启用默认地址操作
     */
    String ENABLE_TEXT[] = {"禁用" , "启用"};
    /**
     * @param addressAddNewParam
     * @return
     */
    void addNew(AddressAddNewParam addressAddNewParam);

    /**
     * @param id
     * @return
     */
    void deleteById(Long id);

    /**
     * @param addressUpdateParam
     * @return
     */
    void updateById(AddressUpdateParam addressUpdateParam);
    /**
     *
     * @param username
     * @return
     */
    AddressListItemVO getAddressByUsername(String username);
    /**
     *
     * @param
     * @return
     */
    PageData<AddressListItemVO> getAddressAll (Integer pageNum, Integer pageSize);

    /**
     *
     * @param
     * @param isDefault
     * @return
     */
    void updateUpDefaultById(Long id, Integer isDefault);

    void updateDownDefaultById(Long id, Integer isDefault);

}
